home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / misc / dspice0s / dmpmem.c < prev    next >
C/C++ Source or Header  |  1992-11-21  |  11KB  |  271 lines

  1. /* dmpmem.f -- translated by f2c (version of 3 February 1990  3:36:42).
  2.    You must link the resulting object file with the libraries:
  3.     -lF77 -lI77 -lm -lc   (in that order)
  4. */
  5.  
  6. #include "f2c.h"
  7.  
  8. /* Common Block Declarations */
  9.  
  10. struct {
  11.     integer ielmnt, isbckt, nsbckt, iunsat, nunsat, itemps, numtem, isens, 
  12.         nsens, ifour, nfour, ifield, icode, idelim, icolum, insize, 
  13.         junode, lsbkpt, numbkp, iorder, jmnode, iur, iuc, ilc, ilr, 
  14.         numoff, isr, nmoffc, iseq, iseq1, neqn, nodevs, ndiag, iswap, 
  15.         iequa, macins, lvnim1, lx0, lvn, lynl, lyu, lyl, lx1, lx2, lx3, 
  16.         lx4, lx5, lx6, lx7, ld0, ld1, ltd, imynl, imvn, lcvn, nsnod, 
  17.         nsmat, nsval, icnod, icmat, icval, loutpt, lpol, lzer, irswpf, 
  18.         irswpr, icswpf, icswpr, irpt, jcpt, irowno, jcolno, nttbr, nttar, 
  19.         lvntmp;
  20. } tabinf_;
  21.  
  22. #define tabinf_1 tabinf_
  23.  
  24. struct {
  25.     doublereal omega, time, delta, delold[7], ag[7], vt, xni, egfet, xmu, 
  26.         sfactr;
  27.     integer mode, modedc, icalc, initf, method, iord, maxord, noncon, iterno, 
  28.         itemno, nosolv, modac, ipiv, ivmflg, ipostp, iscrch, iofile;
  29. } status_;
  30.  
  31. #define status_1 status_
  32.  
  33. struct {
  34.     doublereal cpyknt;
  35.     integer istack[1], lorg, icore, maxcor, maxuse, memavl, ldval, numblk, 
  36.         loctab, ltab, ifwa, nwoff, ntab, maxmem, memerr, nwd4, nwd8, 
  37.         nwd16;
  38. } memmgr_;
  39.  
  40. #define memmgr_1 memmgr_
  41.  
  42. /* Table of constant values */
  43.  
  44. static integer c__1 = 1;
  45.  
  46. /*<       subroutine dmpmem(ipntr) >*/
  47. /* Subroutine */ int dmpmem_(ipntr)
  48. integer *ipntr;
  49. {
  50.     /* Initialized data */
  51.  
  52.     static struct {
  53.     char e_1[600];
  54.     doublereal e_2;
  55.     } equiv_18 = { {'i', 'e', 'l', 'm', 'n', 't', ' ', ' ', 'i', 's', 'b',
  56.          'c', 'k', 't', ' ', ' ', 'n', 's', 'b', 'c', 'k', 't', ' ', 
  57.         ' ', 'i', 'u', 'n', 's', 'a', 't', ' ', ' ', 'n', 'u', 'n', 
  58.         's', 'a', 't', ' ', ' ', 'i', 't', 'e', 'm', 'p', 's', ' ', 
  59.         ' ', 'n', 'u', 'm', 't', 'e', 'm', ' ', ' ', 'i', 's', 'e', 
  60.         'n', 's', ' ', ' ', ' ', 'n', 's', 'e', 'n', 's', ' ', ' ', 
  61.         ' ', 'i', 'f', 'o', 'u', 'r', ' ', ' ', ' ', 'n', 'f', 'o', 
  62.         'u', 'r', ' ', ' ', ' ', 'i', 'f', 'i', 'e', 'l', 'd', ' ', 
  63.         ' ', 'i', 'c', 'o', 'd', 'e', ' ', ' ', ' ', 'i', 'd', 'e', 
  64.         'l', 'i', 'm', ' ', ' ', 'i', 'c', 'o', 'l', 'u', 'm', ' ', 
  65.         ' ', 'i', 'n', 's', 'i', 'z', 'e', ' ', ' ', 'j', 'u', 'n', 
  66.         'o', 'd', 'e', ' ', ' ', 'l', 's', 'b', 'k', 'p', 't', ' ', 
  67.         ' ', 'n', 'u', 'm', 'b', 'k', 'p', ' ', ' ', 'i', 'o', 'r', 
  68.         'd', 'e', 'r', ' ', ' ', 'j', 'm', 'n', 'o', 'd', 'e', ' ', 
  69.         ' ', 'i', 'u', 'r', ' ', ' ', ' ', ' ', ' ', 'i', 'u', 'c', 
  70.         ' ', ' ', ' ', ' ', ' ', 'i', 'l', 'c', ' ', ' ', ' ', ' ', 
  71.         ' ', 'i', 'l', 'r', ' ', ' ', ' ', ' ', ' ', 'n', 'u', 'm', 
  72.         'o', 'f', 'f', ' ', ' ', 'i', 's', 'r', ' ', ' ', ' ', ' ', 
  73.         ' ', 'n', 'm', 'o', 'f', 'f', 'c', ' ', ' ', 'i', 's', 'e', 
  74.         'q', ' ', ' ', ' ', ' ', 'i', 's', 'e', 'q', '1', ' ', ' ', 
  75.         ' ', 'n', 'e', 'q', 'n', ' ', ' ', ' ', ' ', 'n', 'o', 'd', 
  76.         'e', 'v', 's', ' ', ' ', 'n', 'd', 'i', 'a', 'g', ' ', ' ', 
  77.         ' ', 'i', 's', 'w', 'a', 'p', ' ', ' ', ' ', 'i', 'e', 'q', 
  78.         'u', 'a', ' ', ' ', ' ', 'm', 'a', 'c', 'i', 'n', 's', ' ', 
  79.         ' ', 'l', 'v', 'n', 'i', 'm', '1', ' ', ' ', 'l', 'x', '0', 
  80.         ' ', ' ', ' ', ' ', ' ', 'l', 'v', 'n', ' ', ' ', ' ', ' ', 
  81.         ' ', 'l', 'y', 'n', 'l', ' ', ' ', ' ', ' ', 'l', 'y', 'u', 
  82.         ' ', ' ', ' ', ' ', ' ', 'l', 'y', 'l', ' ', ' ', ' ', ' ', 
  83.         ' ', 'l', 'x', '1', ' ', ' ', ' ', ' ', ' ', 'l', 'x', '2', 
  84.         ' ', ' ', ' ', ' ', ' ', 'l', 'x', '3', ' ', ' ', ' ', ' ', 
  85.         ' ', 'l', 'x', '4', ' ', ' ', ' ', ' ', ' ', 'l', 'x', '5', 
  86.         ' ', ' ', ' ', ' ', ' ', 'l', 'x', '6', ' ', ' ', ' ', ' ', 
  87.         ' ', 'l', 'x', '7', ' ', ' ', ' ', ' ', ' ', 'l', 'd', '0', 
  88.         ' ', ' ', ' ', ' ', ' ', 'l', 'd', '1', ' ', ' ', ' ', ' ', 
  89.         ' ', 'l', 't', 'd', ' ', ' ', ' ', ' ', ' ', 'i', 'm', 'y', 
  90.         'n', 'l', ' ', ' ', ' ', 'i', 'm', 'v', 'n', ' ', ' ', ' ', 
  91.         ' ', 'l', 'c', 'v', 'n', ' ', ' ', ' ', ' ', 'n', 's', 'n', 
  92.         'o', 'd', ' ', ' ', ' ', 'n', 's', 'm', 'a', 't', ' ', ' ', 
  93.         ' ', 'n', 's', 'v', 'a', 'l', ' ', ' ', ' ', 'i', 'c', 'n', 
  94.         'o', 'd', ' ', ' ', ' ', 'i', 'c', 'm', 'a', 't', ' ', ' ', 
  95.         ' ', 'i', 'c', 'v', 'a', 'l', ' ', ' ', ' ', 'l', 'o', 'u', 
  96.         't', 'p', 't', ' ', ' ', 'l', 'p', 'o', 'l', ' ', ' ', ' ', 
  97.         ' ', 'l', 'z', 'e', 'r', ' ', ' ', ' ', ' ', 'i', 'r', 's', 
  98.         'w', 'p', 'f', ' ', ' ', 'i', 'r', 's', 'w', 'p', 'r', ' ', 
  99.         ' ', 'i', 'c', 's', 'w', 'p', 'f', ' ', ' ', 'i', 'c', 's', 
  100.         'w', 'p', 'r', ' ', ' ', 'i', 'r', 'p', 't', ' ', ' ', ' ', 
  101.         ' ', 'j', 'c', 'p', 't', ' ', ' ', ' ', ' ', 'i', 'r', 'o', 
  102.         'w', 'n', 'o', ' ', ' ', 'j', 'c', 'o', 'l', 'n', 'o', ' ', 
  103.         ' ', 'n', 't', 't', 'b', 'r', ' ', ' ', ' ', 'n', 't', 't', 
  104.         'a', 'r', ' ', ' ', ' ', 'l', 'v', 'n', 't', 'm', 'p', ' ', 
  105.         ' '}, 0. };
  106.  
  107. #define aptr ((doublereal *)&equiv_18)
  108.  
  109.     static struct {
  110.     char e_1[8];
  111.     doublereal e_2;
  112.     } equiv_19 = { {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, 0. };
  113.  
  114. #define ablnk (*(doublereal *)&equiv_19)
  115.  
  116.  
  117.     /* Format strings */
  118.     static char fmt_5[] = "(\0020current pointer \002,a6,\002@ = z\002,i6,\
  119. /\002 corsiz=\002,i7,/\002 maxmem=\002,i7,/\002 avlspc=\002,i7,/\002 ldval\
  120. =\002,i7,/\0020\002,24x,\002memory allocation map\002/14x,\002blknum memorg \
  121. memsiz\002,\002  memuse usrptr  addr    name\002)";
  122.     static char fmt_11[] = "(13x,5i7,3x,i7,\002z\002,1x,a6)";
  123.     static char fmt_21[] = "(\0020\002,24x,\002end of allocation map\002/)";
  124.  
  125.     /* System generated locals */
  126.     integer i_1;
  127.  
  128.     /* Builtin functions */
  129.     integer s_wsfe(), do_fio(), e_wsfe();
  130.  
  131.     /* Local variables */
  132.     static doublereal anam;
  133.     static integer iadr;
  134.     extern integer locf_();
  135.     static integer madr, morg, muse, ndex, jptr, msiz, ltab1, i, iaddr, itemp;
  136.  
  137.  
  138.     /* Fortran I/O blocks */
  139.     static cilist io__7 = { 0, 0, 0, fmt_5, 0 };
  140.     static cilist io__16 = { 0, 0, 0, fmt_11, 0 };
  141.     static cilist io__17 = { 0, 0, 0, fmt_21, 0 };
  142.  
  143.  
  144.     /* Parameter adjustments */
  145.     --ipntr;
  146.  
  147.     /* Function Body */
  148. /*<       implicit double precision (a-h,o-z) >*/
  149.  
  150. /*      this routine prints out the current memory allocation map. */
  151. /* *ipntr* is the table pointer of the current memory manager call */
  152.  
  153. /* spice version 2g.6  sccsid=tabinf 3/15/83 */
  154. /*<       common /tabinf/ ielmnt,isbckt,nsbckt,iunsat,nunsat,itemps,numtem, >*/
  155. /*<      1   isens,nsens,ifour,nfour,ifield,icode,idelim,icolum,insize, >*/
  156. /*<      2   junode,lsbkpt,numbkp,iorder,jmnode,iur,iuc,ilc,ilr,numoff,isr, >*/
  157. /*<      3   nmoffc,iseq,iseq1,neqn,nodevs,ndiag,iswap,iequa,macins,lvnim1, >*/
  158. /*<      4   lx0,lvn,lynl,lyu,lyl,lx1,lx2,lx3,lx4,lx5,lx6,lx7,ld0,ld1,ltd, >*/
  159. /*<      5   imynl,imvn,lcvn,nsnod,nsmat,nsval,icnod,icmat,icval, >*/
  160. /*<      6   loutpt,lpol,lzer,irswpf,irswpr,icswpf,icswpr,irpt,jcpt, >*/
  161. /*<      7   irowno,jcolno,nttbr,nttar,lvntmp >*/
  162. /* spice version 2g.6  sccsid=status 3/15/83 */
  163. /*<       common /status/ omega,time,delta,delold(7),ag(7),vt,xni,egfet, >*/
  164. /*<      1   xmu,sfactr,mode,modedc,icalc,initf,method,iord,maxord,noncon, >*/
  165. /*<      2   iterno,itemno,nosolv,modac,ipiv,ivmflg,ipostp,iscrch,iofile >*/
  166. /* spice version 2g.6  sccsid=memmgr 3/15/83 */
  167. /*<       common /memmgr/ cpyknt,istack(1),lorg,icore,maxcor,maxuse,memavl, >*/
  168. /*<      1   ldval,numblk,loctab,ltab,ifwa,nwoff,ntab,maxmem,memerr,nwd4, >*/
  169. /*<      2   nwd8,nwd16 >*/
  170. /*<       dimension ipntr(1) >*/
  171. /*<       dimension aptr(75) >*/
  172. /*<       data aptr /6hielmnt,6hisbckt,6hnsbckt,6hiunsat,6hnunsat,6hitemps, >*/
  173. /*<      1 6hnumtem,6hisens ,6hnsens ,6hifour ,6hnfour ,6hifield, >*/
  174. /*<      2 6hicode ,6hidelim,6hicolum,6hinsize, >*/
  175. /*<      3 6hjunode,6hlsbkpt,6hnumbkp,6hiorder,6hjmnode, >*/
  176. /*<      4 6hiur   ,6hiuc   ,6hilc   ,6hilr   ,6hnumoff,6hisr   , >*/
  177. /*<      5 6hnmoffc,6hiseq  ,6hiseq1  ,6hneqn  ,6hnodevs, >*/
  178. /*<      6 6hndiag ,6hiswap ,6hiequa ,6hmacins,6hlvnim1, >*/
  179. /*<      7 6hlx0   ,6hlvn   ,6hlynl  ,6hlyu   ,6hlyl   , >*/
  180. /*<      8 6hlx1   ,6hlx2   ,6hlx3   ,6hlx4   ,6hlx5   ,6hlx6   , >*/
  181. /*<      9 6hlx7   ,6hld0   ,6hld1   ,6hltd   ,6himynl ,6himvn  ,6hlcvn  , >*/
  182. /*<      * 6hnsnod ,6hnsmat ,6hnsval ,6hicnod ,6hicmat ,6hicval ,6hloutpt, >*/
  183. /*<      * 6hlpol  ,6hlzer  ,6hirswpf,6hirswpr,6hicswpf,6hicswpr,6hirpt  , >*/
  184. /*<      * 6hjcpt  ,6hirowno,6hjcolno,6hnttbr ,6hnttar ,6hlvntmp/ >*/
  185. /*<       data ablnk /1h / >*/
  186.  
  187. /*<       iaddr=locf(ielmnt)-1 >*/
  188.     iaddr = locf_(&tabinf_1.ielmnt) - 1;
  189. /*<       itemp=locf(ipntr(1))-iaddr >*/
  190.     itemp = locf_(&ipntr[1]) - iaddr;
  191. /*<       anam=ablnk >*/
  192.     anam = ablnk;
  193. /*<       if(itemp.gt.0.and.itemp.le.75) anam=aptr(itemp) >*/
  194.     if (itemp > 0 && itemp <= 75) {
  195.     anam = aptr[itemp - 1];
  196.     }
  197. /*<       iadr=locf(ipntr(1)) >*/
  198.     iadr = locf_(&ipntr[1]);
  199. /*<       write (iofile,5) anam,iadr,icore,maxmem,memavl,ldval >*/
  200.     io__7.ciunit = status_1.iofile;
  201.     s_wsfe(&io__7);
  202.     do_fio(&c__1, (char *)&anam, (ftnlen)sizeof(doublereal));
  203.     do_fio(&c__1, (char *)&iadr, (ftnlen)sizeof(integer));
  204.     do_fio(&c__1, (char *)&memmgr_1.icore, (ftnlen)sizeof(integer));
  205.     do_fio(&c__1, (char *)&memmgr_1.maxmem, (ftnlen)sizeof(integer));
  206.     do_fio(&c__1, (char *)&memmgr_1.memavl, (ftnlen)sizeof(integer));
  207.     do_fio(&c__1, (char *)&memmgr_1.ldval, (ftnlen)sizeof(integer));
  208.     e_wsfe();
  209. /*<     5 format('0current pointer ',a6,'@ = z',i6,/' corsiz=',i7, >*/
  210. /*<      1  /' maxmem=',i7,/' avlspc=',i7,/' ldval=',i7, >*/
  211. /*<      2  /1h0,24x,'memory allocation map'/14x,'blknum memorg memsiz', >*/
  212. /*<      3  '  memuse usrptr  addr    name') >*/
  213. /*<       ltab1=loctab >*/
  214.     ltab1 = memmgr_1.loctab;
  215. /*<       do 20 i=1,numblk >*/
  216.     i_1 = memmgr_1.numblk;
  217.     for (i = 1; i <= i_1; ++i) {
  218. /*<       morg=istack(ltab1+1) >*/
  219.     morg = memmgr_1.istack[ltab1];
  220. /*<       msiz=istack(ltab1+2) >*/
  221.     msiz = memmgr_1.istack[ltab1 + 1];
  222. /*<       muse=istack(ltab1+3) >*/
  223.     muse = memmgr_1.istack[ltab1 + 2];
  224. /*<       madr=istack(ltab1+4) >*/
  225.     madr = memmgr_1.istack[ltab1 + 3];
  226. /*<       anam=ablnk >*/
  227.     anam = ablnk;
  228. /*<       ndex=madr-iaddr >*/
  229.     ndex = madr - iaddr;
  230. /*<       if(ndex.gt.0.and.ndex.le.75) anam=aptr(ndex) >*/
  231.     if (ndex > 0 && ndex <= 75) {
  232.         anam = aptr[ndex - 1];
  233.     }
  234. /*<       jptr=0 >*/
  235.     jptr = 0;
  236. /*<       if (madr.gt.0) jptr=istack(lorg+madr) >*/
  237.     if (madr > 0) {
  238.         jptr = memmgr_1.istack[memmgr_1.lorg + madr - 1];
  239.     }
  240. /*<       write (iofile,11) i,morg,msiz,muse,jptr,madr,anam >*/
  241.     io__16.ciunit = status_1.iofile;
  242.     s_wsfe(&io__16);
  243.     do_fio(&c__1, (char *)&i, (ftnlen)sizeof(integer));
  244.     do_fio(&c__1, (char *)&morg, (ftnlen)sizeof(integer));
  245.     do_fio(&c__1, (char *)&msiz, (ftnlen)sizeof(integer));
  246.     do_fio(&c__1, (char *)&muse, (ftnlen)sizeof(integer));
  247.     do_fio(&c__1, (char *)&jptr, (ftnlen)sizeof(integer));
  248.     do_fio(&c__1, (char *)&madr, (ftnlen)sizeof(integer));
  249.     do_fio(&c__1, (char *)&anam, (ftnlen)sizeof(doublereal));
  250.     e_wsfe();
  251. /*<    11 format(13x,5i7,3x,i7,'z',1x,a6) >*/
  252. /*<       ltab1=ltab1+ntab >*/
  253.     ltab1 += memmgr_1.ntab;
  254. /*<    20 continue >*/
  255. /* L20: */
  256.     }
  257. /*<       write (iofile,21) >*/
  258.     io__17.ciunit = status_1.iofile;
  259.     s_wsfe(&io__17);
  260.     e_wsfe();
  261. /*<    21 format(1h0,24x,'end of allocation map'/) >*/
  262. /*<       return >*/
  263.     return 0;
  264. /*<       end >*/
  265. } /* dmpmem_ */
  266.  
  267. #undef ablnk
  268. #undef aptr
  269.  
  270.  
  271.